﻿using System.Collections.Generic;
using NetBay.Core.BusinessEntities;
using NetBay.Core.BusinessEntities.Enum;
using Rio.Manager.Business.Repository.Translator;
using Rio.Manager.DataAccess;

namespace Rio.Manager.Business.Repository
{
    public class GeneralParameterRepository
    {
        /// <summary>
        /// Gets all general parameters.
        /// </summary>
        /// <returns></returns>
        public static List<GeneralParameter> GetAllGeneralParameters()
        {
            return GeneralParameterTranslator.GetAllGeneralParameters(DA_GeneralParameter.GetAllGeneralParameters());
        }

        /// <summary>
        /// Gets the general parameter.
        /// </summary>
        /// <returns></returns>
        public static GeneralParameter GetGeneralParameter(GeneralParameterName generalParameterName)
        {
            return GeneralParameterTranslator.GetGeneralParameter(DA_GeneralParameter.GetGeneralParameter(generalParameterName));
        }

        /// <summary>
        /// Updates the general parameter.
        /// </summary>
        /// <param name="updatedGeneralParameter">The updated general parameter.</param>
        /// <returns></returns>
        public static bool UpdateGeneralParameter(GeneralParameter updatedGeneralParameter)
        {
            return DA_GeneralParameter.UpdateGeneralParameter(updatedGeneralParameter);
        }

        /// <summary>
        /// Adds the general parameter.
        /// </summary>
        /// <param name="updatedGeneralParameter">The updated general parameter.</param>
        /// <returns></returns>
        public static bool AddGeneralParameter(GeneralParameter addGeneralParameter)
        {
            return DA_GeneralParameter.AddGeneralParameter(addGeneralParameter);
        }
    }
}